import { create } from 'zustand';
import {
  combine,
  // persist,
  subscribeWithSelector,
} from 'zustand/middleware';

/** store */
export const useRichStore = create(
  subscribeWithSelector(
    combine(
      {
        richContent: '',
      },
      (set) => {
        return {
          async setRichContent(content: string) {
            set((state) => ({ ...state, richContent: content }));
          },
        };
      },
    )
  ),
);
